<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>W-IO监控中心</title>
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="this is my page">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<!-- <link rel="stylesheet" type="text/css" href="/SystemShow/css/SystemShow.css"> -->
</head>
<body>
	<div style='position:absolute;width:100%;height:100%;'>
		<div style='position:absolute;top:0px;left:0px;height:400px;width:600px;border:2px solid #c3dfdf;overflow:auto;'>
			<div style='position:absolute;top:0px;left:0px;width:100%;height:40px;text-align:center;line-height:40px;font-size:21px;background: linear-gradient(#f2f4ec, #93dbe9);'>分组</div>
			<div style='position:absolute;top:50px;left:0px;bottom:0px;right:0px;' id='group'></div>
		</div>
		<div style='position:absolute;top:0px;left:605px;height:400px;width:1150px;border:2px solid #c3dfdf;overflow:hidden;'>
			<div style='position:absolute;top:0px;left:0px;width:100%;height:40px;text-align:center;line-height:40px;font-size:21px;background: linear-gradient(#f2f4ec, #93dbe9);'>方法细节</div>
			<div style='position:absolute;top:50px;left:0px;bottom:0px;right:0px;overflow:auto;' id='functions'></div>
		</div>
		<div style='position:absolute;top:401px;left:0px;height:500px;width:600px;border:2px solid #c3dfdf;overflow:hidden;'>
			<div style='position:absolute;top:0px;left:0px;width:100%;height:40px;text-align:center;line-height:40px;font-size:21px;background: linear-gradient(#f2f4ec, #93dbe9);'>方法</div>
			<div style='position:absolute;top:50px;left:0px;bottom:0px;right:0px;overflow:auto;' id='functionmessages'></div>
		</div>
 		<div style='position:absolute;top:401px;left:605px;height:500px;width:1150px;border:2px solid #c3dfdf;overflow:auto;'>
 			<div style='position:absolute;top:0px;left:0px;width:100%;height:40px;text-align:center;line-height:40px;font-size:21px;background: linear-gradient(#f2f4ec, #93dbe9);'>方法返回</div>
			<div style='position:absolute;top:50px;left:0px;bottom:0px;right:0px;' id='functionreturn'></div>
 		</div>
	</div>
</body>
<script type="text/javascript">
	var tabNamesType = [];
</script>
<script type="text/javascript" src="/AllJs/jquery-1.10.2.js"></script>
<script type="text/javascript" src="/AllJs/formhandle.js"></script>
<script type="text/javascript">
	//用于刷新页面缓存
	document.onkeydown = function(e){
			e = e || window.event;
			if(e.keyCode == 116){
				$.ajax({
					url:'/systemRefreshStatic',
					type:'get',
					data:{'sessionId':'123123'}
				})
			}
		}
</script>
<script type="text/javascript">

	$.ajax({
		url:'/api_getApi',
		data:{'sessionId':'123123'},
		type:'get',
		dataType:'json',
		success:function(data){
			var jsondata = data['jsondata'];
			for(var i=0;i<jsondata.length;i++){
				var cdiv = $("<div style='width:90%;height:30px;padding-left:20px;cursor:pointer;' "
					+"group='"+jsondata[i]+"'>"+jsondata[i]+"</div>");
				var group = $("#group");
				group.append(cdiv);
				cdiv.click(function(){
					methodApi($(this).attr('group'));
				})
			}
		}
	})
	
	var methodApi = function(group){
		$.ajax({
			url:'/api_getApiMessage',
			data:{'sessionId':'123123','group':group},
			type:'get',
			dataType:'json',
			success:function(data){
				var jsondata = data['jsondata'];
				console.log(JSON.stringify(jsondata));
				var functionmessages = $("#functionmessages");
				functionmessages.empty();
				for(var i=0;i<jsondata.length;i++){
					var cdata = jsondata[i];
					var fundiv = $("<div style='width:90%;height:30px;padding-left:20px;cursor:pointer;' "
						+"methodData='"+JSON.stringify(cdata)+"'>"
						+cdata['methodAPI']+"</div>");
					functionmessages.append(fundiv);
					fundiv.click(function(){
						methodAPIMsg(JSON.parse($(this).attr('methodData')));
					})
				}
			}
		})
	}
	
	var methodAPIMsg = function(json){
		var functions = $("#functions");
		functions.empty();
		
		var methodFieldAPIdiv = $("<div style='width:90%;height:30px;padding-left:20px;'>"
						+"字段: "+json['methodFieldAPI']+"</div>");
		functions.append(methodFieldAPIdiv);
		
		var methodUseAPIdiv = $("<div style='width:90%;height:30px;padding-left:20px;'>"
						+"方法用途: "+json['methodUseAPI']+"</div>");
		functions.append(methodUseAPIdiv);
		
		var lockNamesdiv = $("<div style='width:90%;height:30px;padding-left:20px;'>"
						+"锁名称: "+json['lockNames']+"</div>");
		functions.append(lockNamesdiv);
		
		var secondnumdiv = $("<div style='width:90%;height:30px;padding-left:20px;'>"
						+"锁时长: "+json['secondnum']+"</div>");
		functions.append(secondnumdiv);
		
		var geWaitdiv = $("<div style='width:90%;height:30px;padding-left:20px;'>"
						+"获取锁等待: "+json['geWait']+"</div>");
		functions.append(geWaitdiv);
		
		var transdiv = $("<div style='width:90%;height:30px;padding-left:20px;'>"
						+"是否开启事务: "+json['trans']+"</div>");
		functions.append(transdiv);
		
		var tranCommitMinutediv = $("<div style='width:90%;height:30px;padding-left:20px;'>"
						+"事务超时提交时长: "+json['tranCommitMinute']+"</div>");
		functions.append(tranCommitMinutediv);
		
		var tranRollbackMinutediv = $("<div style='width:90%;height:30px;padding-left:20px;'>"
						+"超时回滚时长: "+json['tranRollbackMinute']+"</div>");
		functions.append(tranRollbackMinutediv);
		
		var threadPoolNumMaxdiv = $("<div style='width:90%;height:30px;padding-left:20px;'>"
						+"路径负载配置: "+json['threadPoolNumMax']+"</div>");
		functions.append(threadPoolNumMaxdiv);
		
		var hasFilediv = $("<div style='width:90%;height:30px;padding-left:20px;'>"
						+"是否支持文件: "+json['hasFile']+"</div>");
		functions.append(hasFilediv);
		
		var fileIndiv = $("<div style='width:90%;height:30px;padding-left:20px;'>"
						+"文件传入当前: "+json['fileIn']+"</div>");
		functions.append(fileIndiv);
		
		var interfacetypediv = $("<div style='width:90%;height:30px;padding-left:20px;'>"
						+"方法类型: "+json['interfacetype']+"</div>");
		functions.append(interfacetypediv);
		
		var functionreturn = $("#functionreturn");
		functionreturn.empty();
		var returnTypeAPIdiv = $("<div style='width:90%;height:30px;padding-left:20px;'>"
						+"返回类型: "+json['returnTypeAPI']+"</div>");
		functionreturn.append(returnTypeAPIdiv);
		
		var returnMessageAPIdiv = $("<div style='width:90%;height:30px;padding-left:20px;'>"
						+"返回信息: "+json['returnMessageAPI']+"</div>");
		functionreturn.append(returnMessageAPIdiv);
	}
	
// 	var methodJson = {};
// 	$.ajax({
// 		url:'/api_getApi',
// 		data:{'sessionId':'123123'},
// 		type:'get',
// 		dataType:'json',
// 		success:function(data){
// 			console.log(JSON.stringify(data));
// 			var jsondata = data['jsondata'];
// 			var group = $("#group");
// 			var functionmessages = $("#functionmessages");
// 			for(var key in jsondata){
// 				var cdiv = $("<div style='width:90%;height:30px;padding-left:20px;cursor:pointer;'>"+key+"</div>");
// 				group.append(cdiv);
// 				var groupArray = jsondata[key];
// 				for(var i=0;i<groupArray.length;i++){
// 					var funJson = groupArray[i];
// 					var fundiv = $("<div style='width:90%;height:30px;padding-left:20px;cursor:pointer;' "
// 						+"methodAPI='"+funJson['methodAPI']+"'>"
// 						+funJson['methodAPI']+"</div>");
// 					functionmessages.append(fundiv);
// 					methodJson[funJson['methodAPI']] = funJson;
// 					fundiv.click(function(){
// 						functions_fun($(this).attr('methodAPI'));
// 					})
// 				}
// 			}
// 		}
// 	})
// 	var functions_fun = function(methodAPI){
// 		var functions = $("#functions");
// 		functions.empty();
// 		var json = methodJson[methodAPI];
		
// 		var methodFieldAPIdiv = $("<div style='width:90%;height:30px;padding-left:20px;'>"
// 						+"字段: "+json['methodFieldAPI']+"</div>");
// 		functions.append(methodFieldAPIdiv);
		
// 		var methodUseAPIdiv = $("<div style='width:90%;height:30px;padding-left:20px;'>"
// 						+"方法用途: "+json['methodUseAPI']+"</div>");
// 		functions.append(methodUseAPIdiv);
		
// 		var lockNamesdiv = $("<div style='width:90%;height:30px;padding-left:20px;'>"
// 						+"锁名称: "+json['lockNames']+"</div>");
// 		functions.append(lockNamesdiv);
		
// 		var secondnumdiv = $("<div style='width:90%;height:30px;padding-left:20px;'>"
// 						+"锁时长: "+json['secondnum']+"</div>");
// 		functions.append(secondnumdiv);
		
// 		var geWaitdiv = $("<div style='width:90%;height:30px;padding-left:20px;'>"
// 						+"获取锁等待: "+json['geWait']+"</div>");
// 		functions.append(geWaitdiv);
		
// 		var transdiv = $("<div style='width:90%;height:30px;padding-left:20px;'>"
// 						+"是否开启事务: "+json['trans']+"</div>");
// 		functions.append(transdiv);
		
// 		var tranCommitMinutediv = $("<div style='width:90%;height:30px;padding-left:20px;'>"
// 						+"事务超时提交时长: "+json['tranCommitMinute']+"</div>");
// 		functions.append(tranCommitMinutediv);
		
// 		var tranRollbackMinutediv = $("<div style='width:90%;height:30px;padding-left:20px;'>"
// 						+"超时回滚时长: "+json['tranRollbackMinute']+"</div>");
// 		functions.append(tranRollbackMinutediv);
		
// 		var threadPoolNumMaxdiv = $("<div style='width:90%;height:30px;padding-left:20px;'>"
// 						+"路径负载配置: "+json['threadPoolNumMax']+"</div>");
// 		functions.append(threadPoolNumMaxdiv);
		
// 		var hasFilediv = $("<div style='width:90%;height:30px;padding-left:20px;'>"
// 						+"是否支持文件: "+json['hasFile']+"</div>");
// 		functions.append(hasFilediv);
		
// 		var fileIndiv = $("<div style='width:90%;height:30px;padding-left:20px;'>"
// 						+"文件传入当前: "+json['fileIn']+"</div>");
// 		functions.append(fileIndiv);
		
// 		var interfacetypediv = $("<div style='width:90%;height:30px;padding-left:20px;'>"
// 						+"方法类型: "+json['interfacetype']+"</div>");
// 		functions.append(interfacetypediv);
		
// 		var functionreturn = $("#functionreturn");
// 		functionreturn.empty();
// 		var returnTypeAPIdiv = $("<div style='width:90%;height:30px;padding-left:20px;'>"
// 						+"返回类型: "+json['returnTypeAPI']+"</div>");
// 		functionreturn.append(returnTypeAPIdiv);
		
// 		var returnMessageAPIdiv = $("<div style='width:90%;height:30px;padding-left:20px;'>"
// 						+"返回信息: "+json['returnMessageAPI']+"</div>");
// 		functionreturn.append(returnMessageAPIdiv);
// 	}
</script>
</html>







